From 9236298621a1adcbfeb887510b8383043c7462c3 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Wed, 21 Jan 2004 23:29:08 +0000 Subject: [PATCH] redraw the color button when an alpha is set. Wed Jan 21 18:10:40 2004 Jonathan Blandford * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the color button when an alpha is set. (gtk_color_button_set_alpha): redraw the color button when an alpha is set. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtkcolorbutton.c | 14 +++++++++++++- 6 files changed, 48 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a74d6da328..78af4485c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Jan 21 18:10:40 2004 Jonathan Blandford + + * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the + color button when an alpha is set. + (gtk_color_button_set_alpha): redraw the color button when an + alpha is set. + Wed Jan 21 23:27:14 2004 Matthias Clasen Fix #131869: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a74d6da328..78af4485c5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Wed Jan 21 18:10:40 2004 Jonathan Blandford + + * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the + color button when an alpha is set. + (gtk_color_button_set_alpha): redraw the color button when an + alpha is set. + Wed Jan 21 23:27:14 2004 Matthias Clasen Fix #131869: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index a74d6da328..78af4485c5 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Wed Jan 21 18:10:40 2004 Jonathan Blandford + + * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the + color button when an alpha is set. + (gtk_color_button_set_alpha): redraw the color button when an + alpha is set. + Wed Jan 21 23:27:14 2004 Matthias Clasen Fix #131869: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index a74d6da328..78af4485c5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Wed Jan 21 18:10:40 2004 Jonathan Blandford + + * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the + color button when an alpha is set. + (gtk_color_button_set_alpha): redraw the color button when an + alpha is set. + Wed Jan 21 23:27:14 2004 Matthias Clasen Fix #131869: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a74d6da328..78af4485c5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Wed Jan 21 18:10:40 2004 Jonathan Blandford + + * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the + color button when an alpha is set. + (gtk_color_button_set_alpha): redraw the color button when an + alpha is set. + Wed Jan 21 23:27:14 2004 Matthias Clasen Fix #131869: diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index deef2dde52..ab0e69873f 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -784,6 +784,12 @@ gtk_color_button_set_color (GtkColorButton *color_button, color_button->priv->color.green = color->green; color_button->priv->color.blue = color->blue; + if (color_button->priv->pixbuf != NULL) + g_object_unref (color_button->priv->pixbuf); + color_button->priv->pixbuf = NULL; + + gtk_widget_queue_draw (color_button->priv->drawing_area); + g_object_notify (G_OBJECT (color_button), "color"); } @@ -804,7 +810,13 @@ gtk_color_button_set_alpha (GtkColorButton *color_button, g_return_if_fail (GTK_IS_COLOR_BUTTON (color_button)); color_button->priv->alpha = alpha; - + + if (color_button->priv->pixbuf != NULL) + g_object_unref (color_button->priv->pixbuf); + color_button->priv->pixbuf = NULL; + + gtk_widget_queue_draw (color_button->priv->drawing_area); + g_object_notify (G_OBJECT (color_button), "alpha"); } -- 2.30.2